package com.rd.sys.dto.client.analysis.config;

import baseproj.common.constants.BaseEnum;

/**
 * 网格图配置参数
 * 
 */
public class GridConfig {

    /**
     * 参数名
     * 
     */
    public enum Key implements BaseEnum {
        Column("cfg_grid_column", "行数", "设置将素材横向等分出多少个格子。该参数值越大，每块网格越小，数据越精准。该参数用于研究固定兴趣区的详细眼动数据。"), Row(
                "cfg_grid_row", "列数", "设置将素材纵向等分出多少个格子。该参数值越大，每块网格越小，数据越精准。该参数用于研究固定兴趣区的详细眼动数据。"), ShowType(
                "cfg_grid_showtype",
                "显示内容",
                "设置在网格块上显示哪个参数的数据。(1)持续时长，是指在该网格中眼睛注视的时长；(2)注视点个数，是指在该网格中注视点的个数；(3)首次进入时间，是指第一次进入该网格的时间点；(4)结果命中数，是指选中的测评结果中有多少个测评结果的注视点进入了该网格；(5)结果命中率，是指注视点进入了该网格的测评结果占总测评结果的百分比；(6)平均持续时长，是指注视点进入了该网格的所有选中的测评结果的平均注视时长。");
        // 由于网格算法eyeGrid.js中，行列画图有颠倒，因此此处交换名称，就不做代码上的修改了。

        private String code;
        private String name;
        private String description;

        private Key(String code, String name) {
            this.code = code;
            this.name = name;
        }

        private Key(String code, String name, String description) {
            this.code = code;
            this.name = name;
            this.description = description;
        }

        @Override
        public String getCode() {
            return this.code;
        }

        @Override
        public String getName() {
            return this.name;
        }

        public String getDescription() {
            return description;
        }

    }

    public enum Row implements BaseEnum {
        Row_4("4", "4"), Row_5("5", "5"), Row_6("6", "6"), Row_7("7", "7"), Row_8("8", "8"), Row_9("9", "9"), Row_10(
                "10", "10"), Row_11("11", "11"), Row_12("12", "12"), Row_13("13", "13"), Row_14("14", "14"), Row_15(
                "15", "15"), Row_16("16", "16"), Row_17("17", "17"), Row_18("18", "18"), Row_19("19", "19"), Row_20(
                "20", "20");

        private String code;
        private String name;

        private Row(String code, String name) {
            this.code = code;
            this.name = name;
        }

        @Override
        public String getCode() {
            return this.code;
        }

        @Override
        public String getName() {
            return this.name;
        }

    }

    public enum Column implements BaseEnum {
        Column_4("4", "4"), Column_5("5", "5"), Column_6("6", "6"), Column_7("7", "7"), Column_8("8", "8"), Column_9(
                "9", "9"), Column_10("10", "10"), Column_11("11", "11"), Column_12("12", "12"), Column_13("13", "13"), Column_14(
                "14", "14"), Column_15("15", "15"), Column_16("16", "16"), Column_17("17", "17"), Column_18("18", "18"), Column_19(
                "19", "19"), Column_20("20", "20");

        private String code;
        private String name;

        private Column(String code, String name) {
            this.code = code;
            this.name = name;
        }

        @Override
        public String getCode() {
            return this.code;
        }

        @Override
        public String getName() {
            return this.name;
        }

    }

    public enum ShowType implements BaseEnum {
        Duration("0", "持续时长"), FixCount("1", "注视点个数"), FirstStart("2", "首次进入时间"), HitCount("3", "结果命中数"), HitCountRatio(
                "4", "结果命中率"), DurationAvg("5", "平均持续时长");

        private String code;
        private String name;

        private ShowType(String code, String name) {
            this.code = code;
            this.name = name;
        }

        @Override
        public String getCode() {
            return this.code;
        }

        @Override
        public String getName() {
            return this.name;
        }

    }
}
